<?
class Rule_Equal extends Rule
{
	public $name2;
	public $error_message="Пароли не совпадают";
	
	function __construct($name,$name2, $error_message="")
	{
		$this->name=$name;
		$this->name2=$name2;
		if($error_message!="") $this->error_message = $error_message;
	}
	
	function Check($hash)
	{
		if( $hash[$this->name] === $hash[$this->name2] ) return true;
		return false;
	}
}